@extends('back.index')
@section('title','轮播图管理-后台管理系统')
@section('mian')
    <div style="font-size:14px;padding:20px;" class="modal-content">
        <h2 class="sub-header power_mian">作者轮播图管理</h2>
        <div class="table-responsive">
            <table class="table table-striped">
                <tr>
                    <th>图片名</th>
                    <th>缩略图</th>
                    <th>添加时间</th>
                    <th>操作</th>
                </tr>
                @foreach($pictures as $k)
                <tr>
                    <td>{{$k->icon}}</td>
                    <td>
                        @if($k->icon == '1.png')
                            <img src="{{asset('box/1.png')}}" alt="" style="height:100px;width:100px">
                        @elseif($k->icon == '2.png')
                            <img src="{{asset('box/2.png')}}" alt="" style="height:100px;width:100px">
                        @elseif($k->icon == '3.png')
                            <img src="{{asset('box/3.png')}}" alt="" style="height:100px;width:100px">
                        @elseif($k->icon == '4.png')
                            <img src="{{asset('box/4.png')}}" alt="" style="height:100px;width:100px">
                        @endif
                    </td>
                    <td>{{date('Y-m-d H:i:s',$k->addtime)}}</td>
                    <td>
                        <form action="{{url('back/writer/flowing/lll')}}" method="post" enctype="multipart/form-data">
                            {{csrf_field()}}
                            <div class="form-group">
                                <div class="col-sm-10">
                                    <input type="file" name="icon" class="btn btn-default" >
                                </div>
                            </div>
                            <input type="hidden" value="{{$k->id}}" name="id">
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <input type="submit" class="btn btn-default" value="上传">
                                </div>
                            </div>
                        </form>
                    </td>
                </tr>
                @endforeach
            </table>
            {{$pictures->links()}}
        </div>
    </div>
    @endsection